package com.cookbook.cookbookservice.controller;

import com.cookbook.cookbookservice.common.base.MidPage;
import com.cookbook.cookbookservice.model.dto.CaipuIndexInfoPageDTO;
import com.cookbook.cookbookservice.model.vo.CaipuIndexInfoAdminVO;
import com.cookbook.cookbookservice.model.vo.CaipuIndexInfoVO;
import com.cookbook.cookbookservice.service.CaipuIndexInfoService;
import com.cookbook.cookbookservice.service.CaipuItemInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: cookbook-service
 * @ClassName CookBookController
 * @description:
 * @author: MiaoChao
 * @create: 2024-10-23 16:02
 * @Version 1.0
 **/
@RestController
@RequestMapping("/cookbook")
public class CookBookController {

    @Autowired
    private CaipuItemInfoService caipuItemInfoService;

    @Autowired
    private CaipuIndexInfoService caipuIndexInfoService;


    @PostMapping("/getPageCaipuIndexInfo")
    public MidPage<CaipuIndexInfoAdminVO> getPageCaipuIndexInfo(@RequestBody CaipuIndexInfoPageDTO caipuIndexInfoPageDTO) {
        return caipuIndexInfoService.getPageCaipuIndexInfo(caipuIndexInfoPageDTO);
    }


}